/************************************************/
/*** PATIENT-PHYSICIAN RACE CONCORDANCE, PHYSICIAN DECISIONS, 
     AND PATIENT OUTCOMES: MASTER DO FILE     ***/
/************************************************/

** Note: This Do File is the master do file that runs all the sub-do files for the paper 
** and creates all the empirical results reported in the paper and online appendix.
** Stata/MP 16.0


clear all
set more off

************************************************
**** PART 1: DATA CLEAN  ****
************************************************
	** merge patient visit data with diagnostic testing
	** format date time
	** construct physician shift

	do "1_data clean.do"

	
************************************************
**** PART 2: GENERATE VARIABLES  ****
************************************************
    
	do "2_variable construction.do"


************************************************
**** PART 3: DATA EXTRACTION  ****
************************************************
    ** sample restriction
	** extract variables and generate analytic data
	
	do "3_data extraction.do"

	
************************************************
**** PART 4: REPLICATE MAIN RESULTS   ****
************************************************
    ** produce tables in the paper
	
	do "4_main tables.do"
	
	
************************************************
**** PART 5: REPLICATE APPENDIX RESULTS   ****
************************************************
    ** produce tables in the online appendix
	
	do "5_appendix tables.do"